/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package py.com.peluq.model.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Diego_M
 */
@Embeddable
public class StockPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "iddeposito", nullable = false)
    private int iddeposito;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idseccion", nullable = false)
    private int idseccion;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idsucursal", nullable = false)
    private int idsucursal;
    @Basic(optional = false)
    @NotNull
    @Column(name = "prod_cod", nullable = false)
    private int prodCod;

    public StockPK() {
    }

    public StockPK(int iddeposito, int idseccion, int idsucursal, int prodCod) {
        this.iddeposito = iddeposito;
        this.idseccion = idseccion;
        this.idsucursal = idsucursal;
        this.prodCod = prodCod;
    }

    public int getIddeposito() {
        return iddeposito;
    }

    public void setIddeposito(int iddeposito) {
        this.iddeposito = iddeposito;
    }

    public int getIdseccion() {
        return idseccion;
    }

    public void setIdseccion(int idseccion) {
        this.idseccion = idseccion;
    }

    public int getIdsucursal() {
        return idsucursal;
    }

    public void setIdsucursal(int idsucursal) {
        this.idsucursal = idsucursal;
    }

    public int getProdCod() {
        return prodCod;
    }

    public void setProdCod(int prodCod) {
        this.prodCod = prodCod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) iddeposito;
        hash += (int) idseccion;
        hash += (int) idsucursal;
        hash += (int) prodCod;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof StockPK)) {
            return false;
        }
        StockPK other = (StockPK) object;
        if (this.iddeposito != other.iddeposito) {
            return false;
        }
        if (this.idseccion != other.idseccion) {
            return false;
        }
        if (this.idsucursal != other.idsucursal) {
            return false;
        }
        if (this.prodCod != other.prodCod) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.com.peluq.model.entity.StockPK[ iddeposito=" + iddeposito + ", idseccion=" + idseccion + ", idsucursal=" + idsucursal + ", prodCod=" + prodCod + " ]";
    }
    
}
